Fix macOS release codesign failure caused by empty Apple secrets env vars - #33
Merged
Conversation
Co-authored-by: joelst <30506169+joelst@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job for release on macOS
Fix macOS release codesign failure caused by empty Apple secrets env vars
Sep 1, 2026
joelst
marked this pull request as ready for review
September 2, 2026 00:24
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new $GITHUB_ENV export uses single-line echo "APPLE_CERTIFICATE=$APPLE_CERTIFICATE" which will truncate/split multi-line base64 certificates, potentially breaking configured signing.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR adjusts the macOS release workflow so unsigned builds don’t fail codesigning when Apple signing secrets are unset, by ensuring APPLE_* signing/notarization variables are absent (not present-as-empty) unless a real APPLE_CERTIFICATE is configured.
Changes:
- Updates the “Check Apple signing secrets” step to only export
APPLE_*variables to$GITHUB_ENVwhenAPPLE_CERTIFICATEis non-empty. - Removes unconditional
APPLE_*variables from the “Build and Release” stepenv:to prevent empty-but-present values from triggeringtauri-bundlersigning logic.
File summaries
| File | Description |
|---|---|
| .github/workflows/release.yml | Prevents empty Apple secrets from being forwarded into the build environment, avoiding unintended macOS codesign/cert import attempts on unsigned releases. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+208
to
+215
| { | ||
| echo "APPLE_CERTIFICATE=$APPLE_CERTIFICATE" | ||
| echo "APPLE_CERTIFICATE_PASSWORD=$APPLE_CERTIFICATE_PASSWORD" | ||
| echo "APPLE_SIGNING_IDENTITY=$APPLE_SIGNING_IDENTITY" | ||
| echo "APPLE_ID=$APPLE_ID" | ||
| echo "APPLE_PASSWORD=$APPLE_PASSWORD" | ||
| echo "APPLE_TEAM_ID=$APPLE_TEAM_ID" | ||
| } >> "$GITHUB_ENV" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
release (macos-latest, aarch64-apple-darwin, dmg,app)job was failing during the "Build and Release" step with:This happened even though Flint intentionally ships unsigned macOS builds when no Apple signing secrets are configured.
Root cause
tauri-bundlerchecks for a certificate via Rust'senv::var_os("APPLE_CERTIFICATE"), which returnsSome("")— notNone— for an env var that GitHub Actions sets to an empty string.APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}(and 5 related vars) unconditionally as stepenv:. With the secret unset, this created an empty-but-present env var..p12, and calledsecurity importon the resulting empty file — which fails.Fix
.github/workflows/release.yml: the "Check Apple signing secrets" step now forwardsAPPLE_CERTIFICATE,APPLE_CERTIFICATE_PASSWORD,APPLE_SIGNING_IDENTITY,APPLE_ID,APPLE_PASSWORD,APPLE_TEAM_IDto$GITHUB_ENVonly whenAPPLE_CERTIFICATEis genuinely non-empty.env:block, so on an unsigned build they're truly absent from the process environment rather than empty strings — matching whatvar_osexpects.